home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: wchat.on.ca!news
- From: Sean D. Evans <sevans@wchat.on.ca>
- Subject: Re: Can main() function be called?
- Organization: WorldChat / The Online Source, Burlington Ontario.
- Date: Tue, 6 Feb 1996 19:35:15 GMT
- Message-ID: <DMDD2r.xu@wchat.on.ca>
- X-Nntp-Posting-Host: g2-p12.wchat.on.ca
- Sender: news@wchat.on.ca (News Owner)
-
- m92fra@sabik.tdb.uu.se (Fredrik Raadesand) writes:
- > > I think that it cannot be done, I see no reasonalbe way how main()
- > > could be called more than once.
- > >
- > >
- > > What is your thoughts on this?
- > >
- >
- > I would say the simplest way to find out is to try it out ?
- > ...to post the question on the net is probably more difficult. ;)
- >
- > Either it works or it doesn't, right ?
- >
- > /Fredrik
- The main() function can be called, but why would you want to do that?
- If you were to call the main() function, the original main() would still
- be in memory taking up valuable space. If you need to call main(), just
- RETURN to it. Return a value to main() that will instruct main() to restart
- from the beginning (if that is what you are trying to do).
-
- Sean D. Evans
-